Arduino for Kids by Priya Kuber & Rishi Gaurav Bhatnagar & Vijay Varada
Author:Priya Kuber & Rishi Gaurav Bhatnagar & Vijay Varada [Kuber, Priya]
Language: eng
Format: azw3
Publisher: Packt Publishing
Published: 2017-03-23T04:00:00+00:00
Note
Using the internet, find out how to write constant and variable declarations in your code.
Do you remember how to run basic examples in your code? I am sure you do. But just in case you don't, go back to chapter 1 or 2 (find out which one) and find out how we run examples!
Remember we just learned about registers? All we need to do to access another register in LED blink example is to declare another pin, say pin 3, declare it, and add it in the following code:
Code:
// the setup function runs once when you press reset or power the board void setup() { // initialize digital pin 13 and pin 3 as an output. pinMode(13, OUTPUT); pinMode(3,OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level) digitalWrite(3,HIGH); delay(1000); // wait for a second digitalWrite(13, LOW); // turn the LED off by making the voltage LOW digitalWrite(3,LOW); delay(1000); // wait for a second }
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Linux Device Driver Development Cookbook by Rodolfo Giometti(3935)
Embedded Programming with Modern C++ Cookbook by Igor Viarheichyk(3628)
Implementing Cellular IoT Solutions for Digital Transformation by Dennis McCain(3566)
Embedded Linux Development Using Yocto Project - Third Edition by Otavio Salvador & Daiane Angolini(3401)
TinyML Cookbook by Gian Marco Iodice(3333)
Simplifying 3D Printing with OpenSCAD by Colin Dow(2843)
TinyML Cookbook by Gian Marco Iodice & Ronan Naughton(2604)
Fusion 360 for Makers by Lydia Sloan Cline(2222)
Networking A Beginner's Guide by Bruce Hallberg(2210)
Hands-On Linux for Architects by Denis Salamanca(2053)
But How Do It Know? by J. Clark Scott(2032)
Computers For Seniors For Dummies by Nancy C. Muir(2003)
Raspberry Pi and MQTT Essentials by Dhairya Parikh(1953)
Arduino Project Handbook, Volume 2: 25 Simple Electronics Projects for Beginners by Geddes Mark(1951)
9781803246888-ENHANCING DEEP LEARNING WITH BAYESIAN INFERENCE by Unknown(1902)
Hack and HHVM by Owen Yamauchi(1884)
31 Days Before Your CompTIA A+ Exams (Shanette Luellen's Library) by Benjamin Patrick Conry(1863)
MicroPython Projects by Jacob Beningo(1740)
Hands-On Internet of Things with MQTT by Tim Pulver(1710)
